﻿@model Guline.Web.XjsGame.Models.content
@{
    ViewBag.Title = Model.name;
    Layout = "~/Views/Shared/_xjsLayout.cshtml";
    var iCats = (List<Guline.Web.XjsGame.Models.ICat>)ViewBag.iCats;
    var tinlienquan =(List<Guline.Web.XjsGame.Models.content>) ViewBag.TinLienQuans;
    var currentCat = iCats.Where(m => m.ID == int.Parse(Model.danhmuc)).FirstOrDefault();
}
<script>
    $(document).ready(function () {
        $(".notifymenu li a").removeClass("cactive");
        $(".notifymenu li a[data-catid='@(currentCat.ID)']").addClass("cactive");
        $("#btngototop").click(function () {
            $("html, body").animate({ scrollTop: 0 }, 1000);
            return false;
        });
    });
</script>
<div class="box-news">
    <div class="brackcrum">
        <a class="" href="@Url.Action("Index", "Home")">Trang chủ  &raquo;</a> <a class="" href="@Url.Action("Type", "Content", new { ID = Model.danhmuc,Title=Guline.Web.XjsGame.Infrastructure.Utils.UrlRewriteString(currentCat.Name) })">@currentCat.Name  &raquo;</a> @Model.name
    </div>
    <div class="clr"></div>
    <div class="user_detail" style="margin-bottom: 5px; margin-top: 5px;">
        <h2 class="name_user">@Model.name</h2>
        <div class="clr"></div>
    </div>
    <div class="clr"></div>
    <div class="time_line">
        <a class="time">@Model.date_added.ToString("dd-MM-yyyy hh:mm")</a>
        <div class="clr"></div>
    </div>
    <div class="clr"></div>
    <div class="box-news-content" style=" background:#fff; border:1px solid #dfe0e4;  ">
        @Html.Raw(Model.detail)
    </div>
    <div class="clr"></div>
     <div class="brackcrumbottom">
        <a class="" href="@Url.Action("Index", "Home")">Trang chủ  &raquo;</a> <a class="" href="@Url.Action("Type", "Content", new { ID = Model.danhmuc,Title=Guline.Web.XjsGame.Infrastructure.Utils.UrlRewriteString(currentCat.Name) })">@currentCat.Name  &raquo;</a> <h3>Tin liên quan</h3>
          <div class="clr"></div>
          <a href="#" style="float:right;display:block;" id="btngototop">Lên đầu trang</a>
         <ul>
             
         @foreach (var tlq in tinlienquan)
         { 
             <li><a href="@Url.Action("Detail", "Content", new { ID = tlq.id,Title=Guline.Web.XjsGame.Infrastructure.Utils.UrlRewriteString(tlq.name)  })">- @tlq.name</a> - <span style="font-size:10px">@tlq.date_added.ToString("dd-MM-yyyy")</span></li>
         }
             
         </ul>
         <div class="clr"></div>
    </div>
    <div class="clr"></div>
</div>

